/*
 * Problem: Lattice Animals(网格动物)
 * Author: Yuanshun L
 * Coded: 15-nov-2021
 */

#include<iostream>
#include<cstdio>
#include<cstring>
#include<set>
#include<algorithm>
using namespace std;

struct Cell{
    int x,y;
    Cell(int x=0,int y=0):x(x),y(y){}
    bool operator < (const Cell& rhs) const {
        return x < rhs.x || (x == rhs.x && y < rhs.y);
    }
};

const int maxn = 10;
typedef set<Cell> A;
typedef set<A> AS;
AS Animals[maxn+1];

// directions
int dx[4] = {1,-1,0,0};
int dy[4] = {0,0,1,-1};

// Normalization
A normalize(const A & a){
    A as;
    int minx=10000000,miny=10000000;
    for(A::iterator iter = a.begin(); iter!=a.end();iter++){
        minx = min(minx,iter->x);
        miny = min(miny,iter->y);
    }
    for(A::iterator iter = a.begin(); iter!=a.end();iter++){
        as.insert(Cell(iter->x - minx,iter->y - miny));
    }
    return as;
}

// rotate 90 degree clockwise
A rotate(const A & a){
    A as;
    for(A::iterator iter = a.begin(); iter!=a.end();iter++){
        as.insert(Cell(iter->y,-1*iter->x));
    }
    return normalize(as);
}

// overturn from up to down
A overturn(const A &a){
    A as;
    for(A::iterator iter = a.begin(); iter!=a.end();iter++){
        as.insert(Cell(iter->x,-1*iter->y));
    }
    return normalize(as);
}

int num[maxn+1][maxn+1][maxn+1];

// determine whether the animal is added repeatedly
void check(int n,A & a){
    A p = normalize(a);
    A a1 = p, a2 = overturn(p);
    for(int i=0;i<4;i++){
        if(Animals[n].count(a1) || Animals[n].count(a2)){
           return;
        }
        a1 = rotate(a1);
        a2 = rotate(a2);
    }
//    for(A::iterator it = p.begin();it!=p.end();it++){
//        cout<< it->x <<","<<it->y <<" ";
//    }
//    cout<<endl;
    Animals[n].insert(p);
}

void bfs(int n){
    if(n > maxn){
        return;
    }

    if(n==1){
        A a;
        a.insert(Cell());
        Animals[n].insert(a);
    }
    else{
        AS parent = Animals[n-1];
        for(AS::iterator it1=parent.begin();it1!=parent.end();it1++){
            for(A::iterator it2=it1->begin();it2!=it1->end();it2++){
                Cell c; // cell
                for(int dir=0;dir<4;dir++){
                    c.x = it2->x + dx[dir];
                    c.y = it2->y + dy[dir];
                    if(it1->count(c)) continue;
                    A ani = *it1; // animal
                    ani.insert(c);
                    check(n,ani);
                }
            }
        }
    }
    bfs(n+1);
}

void statistic(){

    for(int n=1;n<=maxn;n++){
        for(int w=1;w<=maxn;w++){
            for(int h=1;h<=maxn;h++){
                for(AS::iterator it1=Animals[n].begin();it1!=Animals[n].end();it1++){
                    int maxx=0,maxy=0;
                    for(A::iterator it2=it1->begin();it2!=it1->end();it2++){
                        maxx = max(it2->x,maxx);
                        maxy = max(it2->y,maxy);
                    }

                    if((w>=maxx +1 && h>=maxy+1) || (h>=maxx +1 && w>=maxy+1)){
                        num[w][h][n]++;
                    }
                }
            }
        }
    }

}

int main(){

    freopen("data.in","r",stdin);
    freopen("data.out","w",stdout);

    memset(num,0,sizeof(num));
    bfs(1);
    statistic();
    int w,h,n;
    while(scanf("%d%d%d",&n,&w,&h) == 3){
        printf("%d\n",num[w][h][n]);
    }

    return 0;
}